Optimal Online and Offline Algorithms for Finding Longest and Shortest Subsequences with Length and Sum Constraints
نویسنده
چکیده
In this paper, we address the following problems: Given a sequence A of n real numbers, and four parameters I, J,X and Y with I ≤ J and X ≤ Y , find the longest (or shortest) subsequence of A such that its length is between I and J and its sum is between X and Y . We present an online and an offline algorithm for the problems, both run in O(n logn) time, which are optimal. key words: length constraint, longest subsequence, offline algorithm, online algorithm, shortest subsequence, sum constraint.
منابع مشابه
Optimal algorithms for locating the longest and shortest segments satisfying a sum or an average constraint
We study several fundamental problems arising from biological sequence analysis. Given a sequence of real numbers, we present two linear-time algorithms, one for locating the “longest” sum-constrained segment, and the other for locating the “shortest” sumconstrained segment. These two algorithms are based on the same framework and run in an online manner, hence they are capable of handling data...
متن کاملTwo optimal algorithms for finding bi-directional shortest path design problem in a block layout
In this paper, Shortest Path Design Problem (SPDP) in which the path is incident to all cells is considered. The bi-directional path is one of the known types of configuration of networks for Automated Guided Vehi-cles (AGV).To solve this problem, two algorithms are developed. For each algorithm an Integer Linear Pro-gramming (ILP) is determined. The objective functions of both algorithms are t...
متن کاملOptimal Algorithms for Finding the Longest Path with Length and Sum Constraints in a Tree
Let T be a tree in which every edge is associated with a real number. The sum of a path in T is the sum of the numbers associated with the edges of the path and its length is the number of the edges in it. For two positive integers L1 ≤ L2 and two real numbers S1 ≤ S2, a path is feasible if its length is between L1 and L2 and its sum is between S1 and S2. We address the problem: Given a tree T ...
متن کاملOptimum Routing in the Urban Transportation Network by Integrating Genetic Meta-heuristic (GA) and Tabu Search (Ts) Algorithms
Urban transportation is one of the most important issues of urban life especially in big cities. Urban development, and subsequently the increase of routes and communications, make the role of transportation science more pronounced. The shortest path problem in a network is one of the most basic network analysis issues. In fact, finding answers to this question is necessity for higher level ana...
متن کاملFinding the Shortest Hamiltonian Path for Iranian Cities Using Hybrid Simulated Annealing and Ant Colony Optimization Algorithms
The traveling salesman problem is a well-known and important combinatorial optimization problem. The goal of this problem is to find the shortest Hamiltonian path that visits each city in a given list exactly once and then returns to the starting city. In this paper, for the first time, the shortest Hamiltonian path is achieved for 1071 Iranian cities. For solving this large-scale problem, tw...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- IEICE Transactions
دوره 93-D شماره
صفحات -
تاریخ انتشار 2010